package gulimall.feign;

import gulimall.utils.R;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Service;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;

import java.util.List;

/**
 * @author HLF
 * @date 2022/9/1 14:59
 */
@FeignClient(value = "gulimall-ware", path = "/ware")
@Service
public interface WareFeignService {

    /**
     * 根据skuId查询是否含有库存,返回一个Map
     * 一定要使用post请求才能传输@RequestBody数据
     */
    @PostMapping("/waresku/hasStockMap")
    R hasStockMapBySkuIds(@RequestBody List<Long> skuIds);
}
